package br.com.sgmf.service;

import br.com.sgmf.dao.ModeloDAO;
import br.com.sgmf.model.Modelo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ModeloService {

    @Autowired
    private ModeloDAO modeloDAO;

    public void save(Modelo modelo) {
        modeloDAO.save(modelo);
    }

    public void update(Modelo modelo) {
        modeloDAO.update(modelo);
    }

    public void delete(Modelo modelo) {
        modeloDAO.delete(modelo);
    }

    public Modelo findById(Integer id) {
        return modeloDAO.findById(id);
    }

    public List<Modelo> findAll() {
        return modeloDAO.findAll();
    }
}
